package main.iterator;

public class MyIterator2 implements MyIterator{

    private MenuItem[] menuItems;

    private int position;

    public MyIterator2(MenuItem[] m) {
	this.position = 0;
	this.menuItems = m;
    }

    public boolean hasNext() {
	if (position < menuItems.length) {
	    return true;
	}
	return false;
    }

    public MenuItem next() {
	MenuItem c = menuItems[position];
	position++;
	return c;
    }
}
